
# set up

p = makePicture("P1.jpg")
grayp = makePicture("P1.jpg")
toGray(grayp)
savePicture(grayp,"grayP1.jpg")
grayRay = toGrayRay(grayp)
gray1d = to1dRay(grayRay)
avGray = (sum(gray1d)+0.0)/len(gray1d)
sd = stanDev(avGray,gray1d)

edPic1 = makePicture(256,192)
showEdges(grayRay,.05*sd,edPic1)
savePicture(edPic1,"edP1-A.jpg")

edPic2 = makePicture(256,192)
showEdges(grayRay,.075*sd,edPic2)
savePicture(edPic2,"edP1-B.jpg")

edPic3 = makePicture(256,192)
showEdges(grayRay,.1*sd,edPic3)
savePicture(edPic3,"edP1-C.jpg")

edPic4 = makePicture(256,192)
showEdges(grayRay,.2*sd,edPic4)
savePicture(edPic4,"edP1-D.jpg")

edPic5 = makePicture(256,192)
showEdges2(grayRay,avGray,.05*sd,edPic5)
savePicture(edPic5,"edP1-E.jpg")

edPic6 = makePicture(256,192)
showEdges2(grayRay,avGray,.075*sd,edPic6)
savePicture(edPic6,"edP1-F.jpg")

edPic7 = makePicture(256,192)
showEdges2(grayRay,avGray,.1*sd,edPic7)
savePicture(edPic7,"edP1-G.jpg")

edPic8 = makePicture(256,192)
showEdges2(grayRay,avGray,.2*sd,edPic8)
savePicture(edPic8,"edP1-H.jpg")
